package com.brspace.qualitycontrol.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.brspace.qualitycontrol.entity.CollectWrit;
import com.brspace.qualitycontrol.entity.Engineering;
import com.brspace.qualitycontrol.entity.Publish;
import com.brspace.qualitycontrol.entity.vo.CollertWritVo;
import com.brspace.qualitycontrol.entity.vo.EngineeringVo;
import com.brspace.qualitycontrol.entity.vo.MonthNumVo;
import com.brspace.qualitycontrol.entity.vo.PaginationVo;
import com.brspace.qualitycontrol.utils.R;

import java.util.List;

/**
 * <p>
 * 收文 服务类
 * </p>
 *
 * @author ${author}
 * @since 2021-04-07
 */
public interface CollectWritService extends IService<CollectWrit> {
    /**
     * 收文列表
     * @param pageParam
     * @param collertWritVo
     * @return
     */
    IPage<CollectWrit> selectPage(Page<CollectWrit> pageParam, CollertWritVo collertWritVo);

    //分页查询当前用户未阅/已阅收文列表
    PaginationVo<CollectWrit> getPullList(Integer pageNum, Integer pageSize, String userId, Integer isRead);

    //每月统计收文数量
    List<MonthNumVo> statisticsByMonth();

    //计算今年收文数量和去年收文数量
    R getNowAndLastNum();

    //收文类型统计列表
    R getTypeNumList();

    /**
     *保存信息
     *@author Hugo
     *@date 2021-04-28 09:32
     **/
    void saveInfo(CollectWrit collectWrit);

    /**
     *流程运转
     *@author Hugo
     *@date 2021-04-28 09:32
     **/
    void examine(CollectWrit collectWrit,String nextId,String userId);

    /**
     * 获取所有代办
     *@author Hugo
     *@date 2021-04-28 15:01
     **/
    List<CollectWrit> pageUnCompleteList(int page,int pageSize,String userId);

    /**
     *显示所有已办
     *@author Hugo
     *@date 2021-04-29 13:53
     **/
    List<CollectWrit> pageCompleteList(int page,int pageSize,String userId);

    List<CollectWrit> pageAllList(int page, int limit, String userId);
}
